/**
 * 
 */
package com.newture.lxz.util;

import java.math.BigDecimal;

/**
 * @author xiao.hu
 *
 */
public class BigDecimalKit {

	public static final boolean lessThan(BigDecimal a, BigDecimal b){
		if(b == null) return true;
		int result = a.compareTo(b);
		return (result == -1) ;// 小于等于
	}
	
	public static final boolean equalTo(BigDecimal a, BigDecimal b){
		int result = a.compareTo(b);
		return (result == 0) ;// 等于
	}
	
	public static final boolean greaterThan(BigDecimal a, BigDecimal b){
		if(b == null) return true;
		int result = a.compareTo(b);
		return (result == 1) ;// 等于
	}
	
	public static final boolean lessThanOrEqualTo(BigDecimal a, BigDecimal b){
		return lessThan(a, b) || equalTo(a, b);
	}
}
